<?php
// 应用公共文件
namespace app\common;

class AssocObject{
    private $_data;
    function __construct($assoc=null){
        $this->_data = $assoc;
        if($this->_data) $this->_data = [];
    }

    function __getter__($name) {
        if(isset($this->_data[$name])){
            return $this->_data[$name];
        }
        else return null;
    }
}